package com.css.dzj.dzjwgr.modules.publicity.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "WGR_PUBLICITY", schema = "DZJWGR", catalog = "")
public class PublicityEntity {
    private String id;
    private String title;
    private String createUser;
    private String createUserUnit;
    private String publicityContent;
    private String status;
    private Date createTime;
    private Date releaseTime;
    private String commentCode;
    private String commAttachment;
    private String publicityLevel;
    private String publicityDay;
    private String otherMsg;
    private String otherTip;
    private Date updateTime;
    private String updateUser;
    private String delFlag;
    private String publicType;
    private String isPublic;

    @Id
    @Column(name = "Id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "Create_User")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "Create_User_Unit")
    public String getCreateUserUnit() {
        return createUserUnit;
    }

    public void setCreateUserUnit(String createUserUnit) {
        this.createUserUnit = createUserUnit;
    }

    @Basic
    @Column(name = "Publicity_Content")
    public String getPublicityContent() {
        return publicityContent;
    }

    public void setPublicityContent(String publicityContent) {
        this.publicityContent = publicityContent;
    }

    @Basic
    @Column(name = "Status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "Create_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "Release_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(Date releaseTime) {
        this.releaseTime = releaseTime;
    }

    @Basic
    @Column(name = "Comment_Code")
    public String getCommentCode() {
        return commentCode;
    }

    public void setCommentCode(String commentCode) {
        this.commentCode = commentCode;
    }

    @Basic
    @Column(name = "Comm_Attachment")
    public String getCommAttachment() {
        return commAttachment;
    }

    public void setCommAttachment(String commAttachment) {
        this.commAttachment = commAttachment;
    }

    @Basic
    @Column(name = "Publicity_Level")
    public String getPublicityLevel() {
        return publicityLevel;
    }

    public void setPublicityLevel(String publicityLevel) {
        this.publicityLevel = publicityLevel;
    }

    @Basic
    @Column(name = "Publicity_Day")
    public String getPublicityDay() {
        return publicityDay;
    }

    public void setPublicityDay(String publicityDay) {
        this.publicityDay = publicityDay;
    }

    @Basic
    @Column(name = "Other_Msg")
    public String getOtherMsg() {
        return otherMsg;
    }

    public void setOtherMsg(String otherMsg) {
        this.otherMsg = otherMsg;
    }

    @Basic
    @Column(name = "Other_Tip")
    public String getOtherTip() {
        return otherTip;
    }

    public void setOtherTip(String otherTip) {
        this.otherTip = otherTip;
    }

    @Basic
    @Column(name = "update_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "update_User")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "del_Flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "Public_Type")
    public String getPublicType() {
        return publicType;
    }

    public void setPublicType(String publicType) {
        this.publicType = publicType;
    }

    @Basic
    @Column(name = "is_Public")
    public String getIsPublic() {
        return isPublic;
    }

    public void setIsPublic(String isPublic) {
        this.isPublic = isPublic;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PublicityEntity that = (PublicityEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(title, that.title) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(createUserUnit, that.createUserUnit) &&
                Objects.equals(publicityContent, that.publicityContent) &&
                Objects.equals(status, that.status) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(releaseTime, that.releaseTime) &&
                Objects.equals(commentCode, that.commentCode) &&
                Objects.equals(commAttachment, that.commAttachment) &&
                Objects.equals(publicityLevel, that.publicityLevel) &&
                Objects.equals(publicityDay, that.publicityDay) &&
                Objects.equals(otherMsg, that.otherMsg) &&
                Objects.equals(otherTip, that.otherTip) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updateUser, that.updateUser) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(publicType, that.publicType) &&
                Objects.equals(isPublic, that.isPublic);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, createUser, createUserUnit, publicityContent, status, createTime, releaseTime, commentCode, commAttachment, publicityLevel, publicityDay, otherMsg, otherTip, updateTime, updateUser, delFlag, publicType, isPublic);
    }
}
